package priv.mill.observer;

import java.util.ArrayList;
import java.util.List;

public class CanZhuo {

	private List<Observ> observers;//观察者的集合
	{
		observers=new ArrayList<Observ>();
	}
	public void addObserv(Observ observ) {
		this.observers.add(observ);
	}

	public void entrySeat(String name){//入座的事件触发
		for (Observ observ : observers) {
			observ.comeHanler(name);
		}
	}

	public void remove(Observ con) {
		observers.remove(con);
	}
	
}
